
import pygame


quit = False
didClick = False
mousePos = (0, 0)

def process():
    global quit
    global didClick
    global mousePos
    
    quit = False
    didClick = False
    
    mousePos = pygame.mouse.get_pos()
    
    for event in pygame.event.get():
        if event.type == pygame.QUIT: quit = True
        elif event.type == pygame.MOUSEBUTTONUP: didClick = True
        elif (event.type == pygame.KEYUP) and (event.key == pygame.K_ESCAPE): quit = True
    